package po;


import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * <p>  
 *  TbUser 用户基础信息表
 * </p>
 * @author  XieTao
 * @date 2020-04-10 
 */


public class TbUser  implements Serializable {


	/**
	 * 用户ID
	 */
	private String uid;

	/**
	 * 用户昵称
	 */
	private String nickname;

	/**
	 * 用户标识码（纯数字）
	 */
	private String usercode;

	/**
	 * 手机号
	 */
	private String phone;

	/**
	 * 密码
	 */
	private String userPassword;

	/**
	 * 解释密码的盐
	 */
	private String salt;

	/**
	 * 邮箱
	 */
	private String email;

	/**
	 * 头像URL
	 */
	private String icon;

	/**
	 * 创建时间
	 */
	private Date createTime;

	/**
	 * 用户状态
	 */
	private Integer state;

	/**
	 * 是否是vip
	 */
	private Integer isVip;

	/**
	 * 签名信息
	 */
	private String sign;

	/**
	 * 二维码信息
	 */
	private String qrCode;

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getUsercode() {
		return usercode;
	}

	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getIsVip() {
		return isVip;
	}

	public void setIsVip(Integer isVip) {
		this.isVip = isVip;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getQrCode() {
		return qrCode;
	}

	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof TbUser)) {
			return false;
		}
		TbUser tbUser = (TbUser) o;
		return Objects.equals(uid, tbUser.uid) &&
				Objects.equals(nickname, tbUser.nickname) &&
				Objects.equals(usercode, tbUser.usercode) &&
				Objects.equals(phone, tbUser.phone) &&
				Objects.equals(userPassword, tbUser.userPassword) &&
				Objects.equals(salt, tbUser.salt) &&
				Objects.equals(email, tbUser.email) &&
				Objects.equals(icon, tbUser.icon) &&
				Objects.equals(createTime, tbUser.createTime) &&
				Objects.equals(state, tbUser.state) &&
				Objects.equals(isVip, tbUser.isVip) &&
				Objects.equals(sign, tbUser.sign) &&
				Objects.equals(qrCode, tbUser.qrCode);
	}

	@Override
	public int hashCode() {
		return Objects.hash(uid, nickname, usercode, phone, userPassword, salt, email, icon, createTime, state, isVip, sign, qrCode);
	}

	@Override
	public String toString() {
		return "TbUser{" +
				"uid='" + uid + '\'' +
				", nickname='" + nickname + '\'' +
				", usercode='" + usercode + '\'' +
				", phone='" + phone + '\'' +
				", userPassword='" + userPassword + '\'' +
				", salt='" + salt + '\'' +
				", email='" + email + '\'' +
				", icon='" + icon + '\'' +
				", createTime=" + createTime +
				", state=" + state +
				", isVip=" + isVip +
				", sign='" + sign + '\'' +
				", qrCode='" + qrCode + '\'' +
				'}';
	}
}
